
  // 检测对象是否为空 undefined null 空字符串
  Object.prototype.test = function( str , callback){
    if(typeof str != "string"){
      throw new Error("参数错误：为字符串类型 结构：\"person[1].name\" 解决json数据嵌套过深，中间出现断层或值不存在，返回false，undefind和null空字符串均为false")
      return
    }
    let obj = this
    str = str.replace(/\[/g,".").replace(/\]/g,"")
    let arr = str.split(".")
    let len = arr.length

    let buer = false

    let key = null
    function test( obj , arr , len , i){
      key = obj
      let str = arr[i]
      let num = 0
      if(/\[[0-9]{1,}\]$/.test(str)){

      }
      if(typeof obj[arr[i]] == "undefined" || Object.prototype.toString.call(obj[arr[i]])== "[object Null]" || obj[arr[i]]==""){
        buer = false
        return
      }else{
        buer = true
      }
      let obj2 = obj[arr[i]]
      if( i == len - 1){
        return
      }
      i++;
      test( obj2 , arr , len , i)
    }
    test(obj , arr , len , 0)
    console.log("=============",buer)
    if(buer && callback ){
      callback(key)
    }
    return buer
  }
